package com.vma.lottery.vo;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by chenzui on 2017/3/27.
 */
public class CodeVo implements Serializable {

    private String codeChinese;

    private Integer code;

    private String color;

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getCodeChinese() {
        return codeChinese;
    }

    public void setCodeChinese(String codeChinese) {
        this.codeChinese = codeChinese;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
        this.color = colorMap.get(String.valueOf(code));
    }



    public static Map<String,String> colorMap = new HashMap<String, String>();

    static {
        colorMap.put("1","red");
        colorMap.put("2","red");
        colorMap.put("3","blue");
        colorMap.put("4","blue");
        colorMap.put("5","green");
        colorMap.put("6","green");
        colorMap.put("7","red");
        colorMap.put("8","red");
        colorMap.put("9","blue");
        colorMap.put("10","blue");
        colorMap.put("11","green");
        colorMap.put("12","red");
        colorMap.put("13","red");
        colorMap.put("14","blue");
        colorMap.put("15","blue");
        colorMap.put("16","green");
        colorMap.put("17","green");
        colorMap.put("18","red");
        colorMap.put("19","red");
        colorMap.put("20","blue");
        colorMap.put("21","green");
        colorMap.put("22","green");
        colorMap.put("23","red");
        colorMap.put("24","red");
        colorMap.put("25","blue");
        colorMap.put("26","blue");
        colorMap.put("27","green");
        colorMap.put("28","green");
        colorMap.put("29","red");
        colorMap.put("30","red");
        colorMap.put("31","blue");
        colorMap.put("32","green");
        colorMap.put("33","green");
        colorMap.put("34","red");
        colorMap.put("35","red");
        colorMap.put("36","blue");
        colorMap.put("37","blue");
        colorMap.put("38","green");
        colorMap.put("39","green");
        colorMap.put("40","red");
        colorMap.put("41","blue");
        colorMap.put("42","blue");
        colorMap.put("43","green");
        colorMap.put("44","green");
        colorMap.put("45","red");
        colorMap.put("46","red");
        colorMap.put("47","blue");
        colorMap.put("48","blue");
        colorMap.put("49","green");

    }
}
